GravityCompat

Compatibility shim for accessing newer functionality from Gravity.

Properties

Link copied to clipboard
val END: Int = 8388613
Push object to x-axis position at the end of its container, not changing its size.
Link copied to clipboard
Binary mask for the horizontal gravity and script specific direction bit.
Link copied to clipboard
Raw bit controlling whether the layout direction is relative or not (START/END instead of absolute LEFT/RIGHT).
Link copied to clipboard
val START: Int = 8388611
Push object to x-axis position at the start of its container, not changing its size.

Functions

Link copied to clipboard
open fun apply(gravity: Int, w: Int, h: Int, @NonNull container: Rect, @NonNull outRect: Rect, layoutDirection: Int)
Apply a gravity constant to an object and take care if layout direction is RTL or not.
open fun apply(gravity: Int, w: Int, h: Int, @NonNull container: Rect, xAdj: Int, yAdj: Int, @NonNull outRect: Rect, layoutDirection: Int)
Apply a gravity constant to an object.
Link copied to clipboard
open fun applyDisplay(gravity: Int, @NonNull display: Rect, @NonNull inoutObj: Rect, layoutDirection: Int)
Apply additional gravity behavior based on the overall "display" that an object exists in.
Link copied to clipboard
open fun getAbsoluteGravity(gravity: Int, layoutDirection: Int): Int
Convert script specific gravity to absolute horizontal value.